// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
import App from './App'
import router from './router'
Vue.use(ElementUI)


axios.defaults.baseURL = "http://localhost:8888/"
axios.defaults.withCredentials = true
Vue.prototype.$axios = axios
Vue.config.productionTip = false
var dayjs = require('dayjs');
Vue.prototype.dayjs = dayjs
Vue.config.productionTip = false

Vue.filter("dateFormat", function(val){
  return dayjs(val).format('YYYY-MM-DD HH:mm:ss');
})
Vue.filter("dateFormatShort", function(val){
  return dayjs(val).format('YYYY-MM-DD');
})

//引入echarts
window.echarts = require('echarts');


/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
